package com.xlhj.boot.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.QuartzJobBean;

import java.time.LocalDateTime;

/**
 * @author: liucaijing
 * @description: CronJob
 * @date: 2021/11/1 14:05
 */
public class CronJob extends QuartzJobBean {

    private static final Logger logger = LoggerFactory.getLogger(CronJob.class);

    @Override
    protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
        logger.info("执行cron定时任务{}", LocalDateTime.now());
    }
}
